{% extends 'layout.html' %}


{% block content %}

<div class="container">
            <div style="margin-bottom: 10px">
                <a class="btn btn-primary" href="/num/add/" target="_blank">新建</a>

                <div style="float: right; width: 300px;">
                <form method="get">
                    <div class="input-group">
                        <input type="text" name="query" class="form-control" placeholder="Search for..."
                            value="{{ search_data }}">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="submit">
                                <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
                            </button>
                        </span>
                    </div>
                </form>
            </div>
            </div>
            <div>
                <div class="panel panel-default">
                    <!-- Default panel contents -->
                    <div class="panel-heading">
                        <span class="glyphicon glyphicon-th-list" aria-hidden="true" style="margin-right: 5px;"></span>
                        <span>靓号列表</span>
                    </div>

                    <!-- Table -->
                    <table class="table table-bordered">
                        <thead>
                            <tr>
                                <th>ID</th>
                                <td>电话</td>
                                <td>价格</td>
                                <td>等级</td>
                                <td>状态</td>

                                <td>操作</td>

                            </tr>
                        </thead>
                        <tbody>
                            {% for obj in num_data %}
                            <tr>
                                <th>{{ obj.id }}</th>
                                <td>{{ obj.mobile }}</td>
                                <td>{{ obj.price}}</td>
                                <td>{{ obj.get_level_display }}</td>
                                <td>{{ obj.get_status_display }}</td>


                                <td>
                                    <a class="btn btn-primary btn-xs" href="/num/{{ obj.id }}/edit">编辑</a>
                                    <a  class="btn btn-danger btn-xs" href="/num/del/?nid={{ obj.id }}">删除</a>
                                </td>
                            </tr>
                            {% endfor %}
                        </tbody>
                    </table>




                </div>


                </div>

  <div class="clearfix">
            <ul class="pagination">
                {{ page_string }}
            </ul>

        </div>
</ul>
<br>

<form method="get">
    <div style="display:inline-block; width: 150px;">
        <div class="input-group">
            <span> <input type="text" class="form-control" placeholder="请输入页码" name="page"></span>
            <span class="input-group-btn">
                <button class="btn btn-primary" type="submit">跳转</button>
            </span>
        </div>
    </div>
</form>


            </div>

        </div>


{% endblock %}
